Dynamic fluid display method and apparatus, electronic device, and readable medium

ABSTRACT

Provided are a dynamic fluid display method and apparatus, an electronic device, and a readable medium. The method includes: detecting a target object on a user display interface; obtaining attribute information of the target object; determining, on the user display interface based on the attribute information of the target object, a change of a parameter of a fluid at each target texture pixel associated with the target object; and displaying a dynamic fluid on the user display interface based on the change of the parameter of the fluid.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation-in-part of InternationalApplication PCT/CN2021/133137 filed on Nov. 25, 2021, which claims apriority to Chinese Patent Application No. 202011562654.5, titled“DYNAMIC FLUID DISPLAY METHOD AND APPARATUS, ELECTRONIC DEVICE, ANDREADABLE MEDIUM”, and filed on Dec. 25, 2020. The present application isalso a continuation-in-part of International ApplicationPCT/CN2021/133136 filed on Nov. 25, 2021, which claims a priority toChinese Patent Application No. 202011565590.4, titled “DYNAMIC FLUIDDISPLAY METHOD AND APPARATUS, ELECTRONIC DEVICE, AND READABLE MEDIUM”,and filed on Dec. 25, 2020. The entire contents of the above-referencedpatent applications are incorporated herein by reference.

FIELD

The present disclosure relates to the field of computer technologies,and more particularly, to a dynamic fluid display method and apparatus,an electronic device, and a readable medium.

BACKGROUND

Various applications based on terminal devices have been widely usedwith the rapid development of computer technology and communicationtechnology, greatly enriching people's daily lives. Users can usevarious applications to entertain themselves, share their daily liveswith other users, etc. In order to enhance the fun, an interactionmethod is usually added to game applications or video shootingapplications to improve user experience.

However, in the related art, the interaction method applied to themobile terminals is neither diversified nor interesting.

SUMMARY

The present disclosure provides a dynamic fluid display method andapparatus, an electronic device, and a readable medium.

In a first aspect, a dynamic fluid display method is provided. Themethod includes: detecting a target object on a user display interface;obtaining attribute information of the target object; determining, onthe user display interface based on the attribute information of thetarget object, a change of a parameter of a fluid at each target texturepixel associated with the target object; and displaying a dynamic fluidon the user display interface based on the change of the parameter ofthe fluid.

In a second aspect, the present disclosure provides an electronicdevice. The electronic device includes: one or more processors; a memoryhaving one or more applications stored thereon. The one or moreapplications, when executed by the one or more processors, cause theelectronic device to perform operations corresponding to the dynamicfluid display method as described in the first aspect of the presentdisclosure.

In a third aspect, the present disclosure provides a computer-readablemedium configured to store computer instructions. The computerinstructions, when executed by a computer, cause the computer to performthe dynamic fluid display method as described in the first aspect of thepresent disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to clearly explain technical solutions of embodiments of thepresent disclosure, accompanying drawings used in description of theembodiments of the present disclosure will be briefly described below.

FIG. 1 is a flowchart illustrating a dynamic fluid display methodaccording to an embodiment of the present disclosure.

FIG. 2 is a flowchart illustrating an execution process of a dynamicfluid display method according to an embodiment of the presentdisclosure.

FIG. 3 is a flowchart illustrating another dynamic fluid display methodaccording to an embodiment of the present disclosure.

FIG. 4 is a schematic diagram showing a structure of a dynamic fluiddisplay apparatus according to an embodiment of the present disclosure.

FIG. 5 is a schematic diagram showing a structure of another dynamicfluid display apparatus according to an embodiment of the presentdisclosure.

FIG. 6 is a schematic diagram showing a structure of an electronicdevice according to an embodiment of the present disclosure.

DETAILED DESCRIPTION

Embodiments of the present disclosure will be described in more detailbelow with reference to the accompanying drawings. Although someembodiments of the present disclosure are shown in the drawings, itshould be understood that the present disclosure can be implemented invarious forms and should not be construed as being limited to theembodiments set forth herein. On the contrary, these embodiments areprovided to facilitate a more thorough and complete understanding of thepresent disclosure. It should be understood that the accompanyingdrawings and embodiments of the present disclosure are only used forexemplary purposes, rather than to limit the protection scope of thepresent disclosure.

It should be understood that steps described in the methodimplementations of the present disclosure may be executed in differentsequences and/or in parallel. In addition, method implementations mayinclude additional steps and/or omit executions of the illustratedsteps. The scope of the present disclosure is not limited in thisrespect.

The term “include” and its variants as used herein indicate open-endedinclusions, i.e., “includes but not limited to”. The term “based on”refers to “at least partially based on”. The term “one embodiment” means“at least one embodiment”; the term “another embodiment” means “at leastone additional embodiment”; and the term “some embodiments” means “atleast some embodiments”. Related definitions of other terms will begiven in the following description.

It should be noted that concepts such as “first” and “second” mentionedin the present disclosure are only used to distinguish apparatuses,modules or units, and are neither used to limit that these apparatuses,modules or units are definitely different apparatuses, modules or units,nor used to limit a sequence or interdependence of functions performedby these apparatuses, modules or units.

It should be noted that modifications such as “a” and “plurality of”mentioned in the present disclosure are schematic instead ofrestrictive, and should be construed as “one or more” by those skilledin the art, unless otherwise clearly indicated in the context.

Names of messages or information exchanged between apparatuses in theembodiments of the present disclosure are only used for illustrativepurposes, and are not intended to limit the scope of these messages orinformation.

The technical solutions of the present disclosure and how the technicalsolutions of the present disclosure solve the above technical problemswill be described in detail below with specific embodiments. Thefollowing several specific embodiments may be combined with each other,and the same or similar concepts or processes may not be repeated insome embodiments. The embodiments of the present disclosure will bedescribed below with reference to the accompanying drawings.

The technical solutions of the present disclosure can be used inapplication programs involving creation, application, and use of dynamicfluid effects. The technical solutions of the present disclosure may beapplied in a terminal device that may include a mobile terminal or acomputer device. The mobile terminal may include, for example, asmartphone, a Personal Digital Assistant (PDA), a tablet computer, awearable device having a display screen, etc. The computer device mayinclude, for example, a desktop computer, a laptop computer, anall-in-one computer, a smart home device, etc.

The technical solutions of the present disclosure can be implemented bya Graphics Processing Unit (GPU) of the terminal device. A user displayinterface is pre-divided into a plurality of grid elements in ahorizontal direction and a vertical direction. The horizontal directioncorresponds to a width direction of the user display interface. Thevertical direction corresponds to a height direction of the user displayinterface. Grid elements correspond to positions of texture pixels ofthe GPU in a one-to-one correspondence. In a two-dimensional plane, thetexture pixels correspond to positions of screen display pixels of theterminal device in a one-to-one correspondence. A fluid is displayed onthe user display interface. The texture pixel is configured to store aparameter of the fluid corresponding to each grid element, including aninitial speed parameter, etc. A color of the fluid displayed on the userdisplay interface may be at least one pre-configured color, or may be atleast one color determined based on a selection instruction of a user.

FIG. 1 is a flowchart illustrating a dynamic fluid display methodaccording to an embodiment of the present disclosure. As illustrated inFIG. 1 , the method may include operations at block S101 to S104.

At block S101, a target object on a user display interface is detected.

The user display interface may be a display interface in an application.The solution provided by the embodiments of the present disclosure maybe implemented as an application or a functional plug-in of anapplication. When the terminal device detects a launch instruction of auser for the application, the application is launched and the userdisplay interface is displayed. Or, when the terminal device detects atrigger instruction of user for the functional plug-in of theapplication, the user display interface is displayed.

Optionally, when a video shooting instruction of user is detected, avideo shooting interface is displayed. In this case, the user displayinterface is the video shooting interface, and the target object may bea specific object on the video shooting interface, including but notlimited to: the face, the head, a gesture, a finger, etc. of a person orother living creatures. The target object may be in motion orstationary.

The gesture may include, but is not limited to, finger up, making afist, making a hand heart, giving a thumb-up, etc.

The terminal device may launch a video capture apparatus (e.g., acamera) of the terminal device to capture a video. A duration of videocapture may be a predetermined time length (and/or time period), or maybe determined based on a start instruction and an end instruction of thevideo capture. The present disclosure is not limited in this regard.During the video capture, the terminal device detects the target objecton the user display interface, i.e., in a video picture.

Optionally, the target object may further include a touch operationobject. For example, the user touches a display screen of the terminaldevice with a finger and swipes on the display screen. When the terminaldevice detects a touch operation instruction, an object inputting thetouch operation instruction is the touch operation object (in this case,the finger is the touch operation object, i.e., the target object).

At block S102, attribute information of the target object is obtained.

The attribute information of the target object is information thatrepresents a specific attribute of the target object. The specificattribute may include information related to a speed and/or a positionof the target object, or may be information related to a color or thelike corresponding to the target object.

Optionally, the position of the target object may be a position of atleast one grid element corresponding to the target object on the userdisplay interface.

A specific implementation of obtaining the attribute information maydiffer depending on a type of the target object.

When the target object is the target object in the video, the terminaldevice may determine the position, speed, and other attributeinformation of the target object based on each frame of image of thevideo.

When the target object is the touch operation object, the terminaldevice may determine the position, speed, and other attributeinformation of the target object based on a position of a detected touchoperation, a time, or the like.

The color corresponding to the target object may be a predeterminedcolor, and also may be a color determined based on the selectioninstruction entered by the user.

In a possible implementation, the target object includes the targetobject in the video. The attribute information of the target objectincludes a speed variation of the target object. Obtaining the attributeinformation of the target object includes: obtaining a position of thetarget object in each frame of image of the video; determining a movingdistance of the target object from one frame of image to a next frame ofimage based on the position of the target object in each frame of imageof the video; obtaining a moving time of the target object from the oneframe of image to the next frame of image; determining a moving speed ofthe target object at each time point based on the moving distance andthe moving time; and determining a speed variation of the target objectfrom a current time point to a next time point, based on the movingspeed of the target object at each time point.

In practice, the target object may be the target object in the video,e.g., a gesture in the video. A position of the gesture in each frame ofimage of the video is obtained subsequent to a detection of the gesturein the video. A moving distance of the gesture in adjacent frames ofimage can be obtained based on the position of the gesture in each frameof image of the video. A moving time of the gesture in adjacent framesof image is obtained. A moving speed of the gesture is determined basedon the moving distance and the moving time of the gesture. A speedvariation of the gesture is determined based on the moving speed of thegesture at each time point.

In a possible implementation, the target object includes the touchoperation object. The attribute information of the target objectincludes a speed variation of the target object. Obtaining the attributeinformation of the target object includes: detecting a swiping operationspeed of the touch operation object on the user display interface ateach time point; and determining a speed variation of the touchoperation object from a current time point to a next time point based onthe swiping operation speed.

In practice, the target object may be the touch operation object. Forexample, when the finger touches and swipes on a screen, the terminaldevice detects a position corresponding to a swiping operation at eachtime point, determines a moving distance from a current time point to anext time point based on a position corresponding to each time point,and determines a time interval from the current time point to the nexttime point. A swiping operation speed at each time point can becalculated based on the moving distance and the time interval. A speedvariation of swiping of the finger can be obtained based on the swipingoperation speed at each time point.

At block S103, a change of a parameter of a fluid at each target texturepixel associated with the target object is determined on the userdisplay interface based on the attribute information of the targetobject.

The change of the parameter of the fluid at each target texture pixelassociated with the target object can be determined on the user displayinterface based on a change of the position of, the speed of, and thecolor corresponding to the target object, to enable interaction betweenthe user and the terminal device. The target texture pixel is a texturepixel on the user display interface and associated with the targetobject, i.e., a texture pixel corresponding to an action scope of thetarget object. The parameter of the fluid may include a speed parameter,a color parameter, etc.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The attribute information of the target object includesa speed variation of the target object. Determining, on the user displayinterface based on the attribute information of the target object, thechange of the parameter of the fluid at each target texture pixelassociated with the target object includes: determining a change of thespeed parameter of the fluid at each target texture pixel based on thespeed variation of the target object.

In practice, when the target object includes the target object in thevideo (e.g., the finger of the user), a position of the target object ineach frame of image of the video is obtained subsequent to a detectionof the target object in the video. A distance of the target object inadjacent frames of image is determined based on the position of thetarget object in each frame of image. A speed of the target object isdetermined based on the distance of the target object in the adjacentframes of image. The speed variation of the target object is determinedbased on the speed of the target object at each time point. When thetarget object includes the touch operation object, the terminal devicedetects a start position and an end position of the touch operation,determines an action distance of the touch operation based on the startposition and the end position, determines an action time of the touchoperation based on a start time point and an end time point of the touchoperation, and determines the speed of the target object based on theaction time and the action distance, to further determine the speedvariation of the target object based on the speed of the target objectat each time point.

The terminal device may adjust the speed parameter of the fluid at eachtarget texture pixel based on the speed variation of the target object,in such a manner that the fluid changes in speed based on a change ofthe speed of the target object. The speed change of the fluid mayinclude at least one of a change in a speed magnitude or a change in aspeed direction.

In a possible implementation, the attribute information of the targetobject may further include initial position information of the targetobject and an action radius of the target object. Determining the changeof the speed parameter of the fluid at each target texture pixel basedon the speed variation of the target object includes: obtaining, foreach target texture pixel, position information corresponding to thetarget texture pixel; and determining, for each target texture pixel, aspeed of the fluid at the target texture pixel at a next time point,based on the speed variation of the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a speed of the fluid at the target texture pixel at a currenttime point.

In practice, the attribute information of the target object furtherincludes the initial position information of the target object and theaction radius of the target object. The initial position information ofthe target object is a position of the target object when the targetobject first appears on the user display interface, and may be aposition of at least one grid element corresponding to the target objectwhen the target object first appears on the user display interface. Theaction radius of the target object represents the action scope of thetarget object on the user display interface. The action radius may bepre-configured as specifically needed. With an increase of the actionradius, the action scope of the target object on the user displayinterface becomes larger. The position of the target object on the userdisplay interface corresponds to a position of each target texturepixel. A position of each corresponding target texture pixel may bedetermined based on the position of the target object. The speed of thefluid at the target texture pixel at the next time point is determinedbased on the speed variation of the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and the speed of the fluid at the target texture pixel at thecurrent time point.

In an example, the speed of the fluid at the target texture pixel may beupdated in accordance with an equation (1):

$\begin{matrix}{V_{x}^{t + 1} = {V_{x}^{t} + {\exp( \frac{{{x - p}}^{2}}{r^{2}} )*\Delta V}}} & (1)\end{matrix}$

where v_(x) ^(t+1) represents a speed of the fluid at a target texturepixel x at a time point t+1, v_(x) ^(t) represents a speed of the fluidat the target texture pixel x at a time point t, x represents a gridelement position corresponding to the target texture pixel, p representsan initial position of the target object, r represents the action radiusof the target object, and ΔV represents the speed variation of thetarget object from the time point t to the time point t+1.

In a possible implementation, the parameter of the fluid includes acolor parameter. The attribute information of the target object includesa color variation corresponding to the target object. Determining, onthe user display interface based on the attribute information of thetarget object, the change of the parameter of the fluid at each targettexture pixel associated with the target object includes: determining achange of the color parameter of the fluid at each target texture pixelbased on the color variation of the target object.

In practice, the parameter of the fluid includes the color parameter.The attribute information of the target object includes the colorvariation corresponding to the target object. The color variationcorresponding to the target object may be a difference between a colorvalue of a color corresponding to the target object at the current timepoint and a color value of a color corresponding to the target object ata previous time point. The color value may be a color value in any colorspace, for example, values of R, G, and/or B channels of an RGB colorspace.

The color parameter of the fluid at each target texture pixel may beadjusted based on the color variation corresponding to the targetobject, in such a manner that the fluid changes in color based on achange of the color corresponding to the target object.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. Determining the changeof the color parameter of the fluid at each target texture pixel basedon the color variation corresponding to the target object includes:obtaining, for each target texture pixel, position informationcorresponding to the target texture pixel; and determining, for eachtarget texture pixel, a color of the fluid at the target texture pixelat a next time point, based on the color variation corresponding to thetarget object, the initial position information of the target object,the action radius of the target object, the position informationcorresponding to the target texture pixel, and a color of the fluid atthe target texture pixel at a current time point.

In practice, the attribute information of the target object furtherincludes the initial position information of the target object and theaction radius of the target object. The initial position information ofthe target object is the position of the target object when the targetobject first appears on the user display interface, and may be theposition of at least one grid element corresponding to the target objectwhen the target object first appears on the user display interface. Theaction radius of the target object represents the action scope of thetarget object on the user display interface. The action radius may bepre-configured as specifically needed. With an increase of the actionradius, the action scope of the target object on the user displayinterface becomes larger. The position of the target object on the userdisplay interface corresponds to the position of each target texturepixel. The position of each target texture pixel may be determined basedon the position of the target object. The color of the fluid at thetarget texture pixel at the next time point is determined based on thecolor variation corresponding to the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and the color of the fluid at the target texture pixel at thecurrent time point.

In an example, the color of the fluid at the target texture pixel may beupdated in accordance with an equation (2):

$\begin{matrix}{q_{x}^{t + 1} = {q_{x}^{t} + {{\exp( \frac{{{x - p}}^{2}}{r^{2}} )}*\Delta q}}} & (2)\end{matrix}$

where q_(x) ^(t+1) represents a color of the fluid at the target texturepixel x at the time point t+1, q_(x) ^(t) represents a color of thefluid at the target texture pixel x at the time point t, x representsthe grid element position corresponding to the target texture pixel, prepresents the initial position of the target object, r represents theaction radius, and Δq represents the color variation of the targetobject from the time point t to the time point t+1.

Optionally, the color variation corresponding to the target objectremains the same when the target object is in a single continuousmovement.

For example, when the finger swipes on a screen of the terminal device,the color corresponding to the finger remains the same in a swipingprocess. For example, the finger corresponds to a predetermined color,which is added to a color of the fluid at a swiping position of thefinger. The color of the fluid at the swiping position of the finger ischanged based on a color variation before and after the predeterminedcolor is added.

In a possible implementation, the attribute information includes adisplay position of the target object when the target object isstationary. The parameter of the fluid includes a color parameter.Determining, on the user display interface based on the attributeinformation of the target object, the change of the parameter of thefluid at each target texture pixel associated with the target objectincludes: determining, on the user display interface based on thedisplay position, a position of each target texture pixel associatedwith the target object, and adjusting a color of the fluid at eachtarget texture pixel to a predetermined color.

In practice, when the target object is stationary, the attributeinformation of the target object includes the display position of thetarget object. The display position of the target object may be theposition of the at least one grid element corresponding to the targetobject on the user display interface, i.e., a position of a grid elementcorresponding to at least one corresponding target texture pixel. Theterminal device adjusts the color of the fluid at each target texturepixel to the predetermined color corresponding to the target object.

In an example, when the terminal device detects in the video that thetarget object is a stationary “hand heart” gesture corresponding to thepredetermined color of red, the terminal device displays, on the userdisplay interface, a red “hand heart” gesture at a position of the fluidcorresponding to the target object. In this case, since the targetobject is stationary and has no impact on the speed parameter of thefluid, the fluid is displayed on the user display interface based on aninitial speed parameter.

In a possible implementation, when at least two target objects areprovided, the attribute information of the target object includesrespective attribute information of each target object of the at leasttwo target objects. Determining, on the user display interface based onthe attribute information of the target object, the change of theparameter of the fluid at each target texture pixel associated with thetarget object includes: determining, on the user display interface basedon the respective attribute information of each target object of the atleast two target objects, a change of the parameter of the fluid at eachtarget texture pixel associated with each target object, to display onthe user display interface a dynamic fluid corresponding to each targetobject.

In practice, interaction of a plurality of target objects may beperformed on the user display interface. Each target object adjusts thechange of the parameter of the fluid at its corresponding target texturepixel based on its corresponding attribute information.

In determining the respective attribute information of the plurality oftarget objects, the plurality of target objects may be target objects inthe video. In this case, for each target object of the plurality oftarget objects, when a position of the target object in adjacent framesof image of the video remains the same or the position of the targetobject in the adjacent frames of image of the video changes within apredetermined range, the target object is determined to be a same targetobject, thereby determining attribution of attribute information of thetarget object. The plurality of target objects may also be touchoperation objects. In this case, for each target object of the pluralityof target objects, whether the target object is the same target objectis determined based on a touch operation position of the target object,thereby determining the attribution of the attribute information of thetarget object.

In an example, the video is assumed to include three gestures: “making afist”, “making a hand heart”, and “giving a thump-up”. Speed variationscorresponding to “making a fist”, “making a hand heart”, and “giving athump-up” are Δv₁, Δv₂, and Δv₃, respectively. Color variationscorresponding to “making a fist”, “making a hand heart”, and “giving athump-up” are Δq₁, Δq₂, and Δq₃, respectively. On the user displayinterface, a change of the speed parameter of the fluid at the targettexture pixel associated with “making a fist” is determined based onΔv₁, and a change of the color parameter of the fluid at the targettexture pixel associated with “making a fist” is determined based onΔq₁; a change of the speed parameter of the fluid at the target texturepixel associated with “making a hand heart” is determined based on Δv₂,and a change of the color parameter of the fluid at the target texturepixel associated with “making a hand heart” is determined based on Δq₂;and a change of the speed parameter of the fluid at the target texturepixel associated with “giving a thump-up” is determined based on Δv₃,and a change of the color parameter of the fluid at the target texturepixel associated with “giving a thump-up” is determined based on Δq₃.

At block S104, a dynamic fluid is displayed on the user displayinterface based on the change of the parameter of the fluid.

Specifically, a fluid simulation rendering is displayed on the userdisplay interface based on the speed change of the fluid or the colorchange of the fluid. A dynamic effect of the fluid may be displayed in aform of a video or a motion image.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The method further includes, for each target texturepixel: obtaining a time stepsize for updating the speed parameter;obtaining the speed parameter of the fluid at the target texture pixelat a current time point; determining a first texture pixel position atthe current time point based on the time stepsize, the speed parameterof the fluid at the target texture pixel at the current time point, anda position of the target texture pixel at the current time point; anddetermining a color at the first texture pixel position at the currenttime point as a color of the fluid at the target texture pixel at a nexttime point.

In practice, the time stepsize for updating the speed parameter may bepredetermined. The speed parameter of the fluid at each target texturepixel may be updated based on the time stepsize. The color of the fluidat each target texture pixel may be updated simultaneously as the speedparameter is updated.

In an example, the color of the fluid at each target texture pixel maybe updated in accordance with an equation (3):

I _(x) ^(t+1) =I _(x−dt*v) _(x) _(t)   (3)

where x represents a position of a grid element corresponding to thetarget texture pixel; I_(x) ^(t+1) represents a color of the fluid atthe position x at the time point t+1; dt represents the time stepsize;v_(x) ^(t) represents a speed parameter of the fluid at the position xat the time point t; x−dt*v_(x) ^(t) represents the first texture pixelposition at the time point t; and I_(x−dt*v) _(x) _(t) represents acolor of the fluid at the first texture pixel position at the time pointt.

In a possible implementation, the method further includes, for eachtarget texture pixel, in response to detecting no target object in theuser display interface: determining a second texture pixel position atthe current time point based on the time stepsize, the speed parameterof the fluid at the target texture pixel at the current time point, andthe position of the target texture pixel at the current time point; anddetermining a speed parameter of the fluid at the second texture pixelposition at the current time point as a speed parameter of the fluid atthe target texture pixel at the next time point.

In practice, when an initial state of the fluid is a stationary state,the parameter of the fluid at each target texture pixel in an imagechanges based on the attribute information of the target objectsubsequent to the detection of the target object, to enable the fluid todrive the image to start flowing. When the user stops an interactionaction at a time point, i.e., no target object is detected in the userdisplay interface, the fluid continues to flow in accordance withinertia at this time point. A specific processing method is: for eachtarget texture pixel in the image, determining the second texture pixelposition at the current time point based on the predetermined timestepsize for updating the speed, the speed parameter of the fluid at thetarget texture pixel at the current time point, and the position of thetarget texture pixel at the current time point; and determining thespeed parameter of the fluid at the second texture pixel position at thecurrent time point as the speed parameter of the fluid at the targettexture pixel at the next time point, and updating the color of thefluid based on the speed parameter. The color of the fluid may beupdated in accordance with the method shown in the equation (3), toenable the image to flow with the inertia of the fluid.

In an example, the speed of the fluid at each target texture pixel maybe updated in accordance with an equation (4):

V _(x) ^(t+1) =v _(x−dt*v) _(x) _(t)   (4)

where x represents the position of the grid element corresponding to thetarget texture pixel; V_(x) ^(t+1) represents a speed parameter of thefluid at the position x at the time point t+1; dt represents the timestepsize; v_(x) ^(t) represents the speed parameter of the fluid at theposition x at the time point t; x−dt*v_(x) ^(t) represents the secondtexture pixel position corresponding to the target texture pixel at theposition x at the time point t; and V_(x−dt*v) _(x) _(t) represents thespeed parameter of the fluid at the second texture pixel position at thetime point t.

In an example, a 1-st gesture produces a rightward speed for the fluidon the left and a 2-nd gesture produces a leftward speed for the fluidon the right, thus the fluids on both sides will move towards themiddle, creating a collision effect. When no gesture is detected in acurrent picture, the fluid will continue to flow under the action of theinertia.

After the collision, for the fluid under the action of the inertia, thespeed of the fluid at each target texture pixel is updated in accordancewith the equation (4).

After the collision, for the fluid under the action of the inertia, thecolor of the fluid at each target texture pixel is updated in accordancewith the equation (3).

Based on the above technical solution provided by the presentdisclosure, an explanation of the technical solution is provided belowwith a specific embodiment. The specific embodiment and its contents areintended only to illustrate a possible implementation of the technicalsolution of the present disclosure and do not represent allimplementations of the technical solution of the present disclosure.

As illustrated in FIG. 2 , the operation at block S201 is executed. Upondetecting a camera launch instruction on the user display interface, theterminal device launches the camera to capture a video (“a cameracaptures a picture” illustrated in the figure).

The operation at block S202 is executed: a gesture detection isperformed on a video picture.

The operation at block S203 is executed: when a movement of a finger isdetected, a speed variation and a corresponding color variation of thefinger are obtained, and the change of the speed and the change of thecolor of the fluid at the target texture pixel corresponding to thefinger are determined based on the speed variation and the colorvariation (“determine a change of a parameter of a fluid” illustrated inFIG. 2 ).

The operation at block S204 is executed: when a movement of anothergesture in the video picture is detected, a speed variation and acorresponding color variation of the other gesture are obtained, and thechange of the speed and the change of the color of the fluid at thetarget texture pixel corresponding to the finger are determined based onthe speed variation and the color variation.

The operation at block S205 is executed: when no gesture is detected inthe video picture, the terminal device may simulate a state in which thefluid continues to move under the action of the inertia (e.g., “thefluid continues to flow under the action of the inertia” illustrated inFIG. 2 ).

In each of the above operations, the movement of the finger, themovement of the other gesture, the movement of the fluid, and the changeof the color are displayed on the user display interface. In theoperation at block S206 illustrated in the figure, the terminal deviceoutputs the image to the screen of the terminal device.

In the dynamic fluid display method provided in the embodiments of thepresent disclosure, the target object on the user display interface isdetected. The attribute information of the target object is obtained.The change of the parameter of the fluid at each target texture pixelassociated with the target object is determined on the user displayinterface based on the attribute information of the target object. Thedynamic fluid is displayed on the user display interface based on thechange of the parameter of the fluid. With the technical solution of thepresent disclosure, the change of the parameter of the fluid on the userdisplay interface is controlled based on the attribute information ofthe target object detected on the user display interface, therebydisplaying the dynamic fluid. Such an interaction method is a novel andinteresting.

FIG. 3 is a flowchart illustrating another dynamic fluid display methodaccording to an embodiment of the present disclosure. In addition to theoperations illustrated in FIG. 1 , the method further includes thefollowing operations.

At block S105, an image corresponding to the image input operation isdisplayed on the user display interface in response to an image inputoperation of a user, and the fluid and the image are displayed bysuperimposing the fluid on the image.

The terminal device may receive an image inputted by the user as abackground image, and divide the background image into a plurality ofgrid elements in a horizontal direction and a vertical direction. Thehorizontal direction corresponds to a width direction of the image. Thevertical direction corresponds to a height direction of the image. Thegrid elements correspond to the positions of the texture pixels of theGPU in a one-to-one correspondence. In the two-dimensional plane, thetexture pixels correspond to the positions of the screen display pixelsof the terminal device in a one-to-one correspondence. When thebackground image is displayed on the user display interface, the texturepixels correspond to pixels in the background image in a one-to-onecorrespondence. That is, the grid elements correspond to the pixels inthe background image in a one-to-one correspondence. The fluid isdisplayed in the background image. The texture pixel is configured tostore the parameter of the fluid corresponding to each grid element,including the initial speed parameter, etc.

The background image may be an image in any color, which may be a singlecolor or a plurality of colors. The fluid may be a fluid in any colorand may be in a stationary state or a moving state. The fluid and theimage inputted by the user are displayed by superimposing the fluid onthe image inputted by the user. Optionally, the color of the fluid isdifferent from that of the background image. In this way, a betterdisplay effect is achieved when the fluid and the background image aredisplayed on the user display interface.

In an example, the fluid is colorless, transparent and in the stationarystate, and the background image is a multi-colored image displaying acontent of a landscape. When the fluid is displayed in the backgroundimage by superimposing the fluid on the background image, the backgroundimage with a layer of transparent fluid superimposed is displayed on theuser display interface.

Correspondingly, the operation of determining, on the user displayinterface based on the attribute information of the target object, thechange of the parameter of the fluid at each target texture pixelassociated with the target object at block S103 includes: determining,in the image based on the attribute information, the change of theparameter of the fluid at each target texture pixel associated with thetarget object.

The change of the parameter of the fluid at each target texture pixelassociated with the target object may be determined in the image basedon the change in the position, the speed, and the like of the targetobject, thereby enabling an interaction between the user and theterminal device. The target texture pixel is a texture pixel in theimage and associated with the target object, i.e., the texture pixelcorresponding to the action scope of the target object. At least onetarget texture pixel may be provided. The parameter of the fluid may bea relevant parameter reflecting a movement state, a display state, orthe like of the fluid.

The operation of displaying the dynamic fluid on the user displayinterface based on the change of the parameter of the fluid at blockS104 includes: displaying the dynamic fluid in the image based on thechange of the parameter of the fluid at each target texture pixel.

In some embodiments, the fluid simulation rendering is displayed on theimage based on a change of the movement state, the display state, orother relevant parameters of the fluid, thereby presenting that the flowof fluid drives the background image to move together with the fluid.The dynamic effect of the fluid may be displayed in the form of a videoor a motion image.

Optionally, the target object at block S101 and block S102 may be aspecific object in the video, including but not limited to: the face,the head, a gesture, a finger, etc. of a person or other livingcreatures.

The gesture may include, but is not limited to, finger up, making afist, making a hand heart, giving a thumb-up, etc.

In the dynamic fluid display method provided in the embodiments of thepresent disclosure, the background image inputted by the user may bereceived. The fluid and the background image may be displayed bysuperimposing the fluid on the background image. When the target objectis detected on the user display interface, the change of the parameterof the fluid in the image is controlled based on the attributeinformation of the target object detected on the user display interface,to display the dynamic fluid, thereby realizing that the fluid drivesthe background image to move together with the fluid. Such aninteraction method is novel and interesting.

Based on the same principle as that of the method illustrated in FIG. 1, the embodiments of the present disclosure further provide a dynamicfluid display apparatus 40. As illustrated in FIG. 3 , the dynamic fluiddisplay apparatus 40 may include a detection module 41, an obtainingmodule 42, a determining module 43, and a first display module 44.

The detection module 41 is configured to detect a target object on auser display interface. The obtaining module 42 is configured to obtainattribute information of the target object. The determining module 43 isconfigured to determine, on the user display interface based on theattribute information of the target object, a change of a parameter of afluid at each target texture pixel associated with the target object.The first display module 44 is configured to display a dynamic fluid onthe user display interface based on the change of the parameter of thefluid.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The attribute information of the target object includesa speed variation of the target object. The determining module 43 isconfigured to: determine a change of the speed parameter of the fluid ateach target texture pixel based on the speed variation of the targetobject.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. The determining module43 is configured to, when determining the change of the speed parameterof the fluid at each target texture pixel based on the speed variationof the target object: obtain, for each target texture pixel, positioninformation corresponding to the target texture pixel; and determine,for each target texture pixel, a speed of the fluid at the targettexture pixel at a next time point, based on the speed variation of thetarget object, the initial position information of the target object,the action radius of the target object, the position informationcorresponding to the target texture pixel, and a speed of the fluid atthe target texture pixel at a current time point.

In a possible implementation, the parameter of the fluid includes acolor parameter. The attribute information of the target object includesa color variation corresponding to the target object. The determiningmodule 43 is configured to: determine a change of the color parameter ofthe fluid at each target texture pixel based on the color variationcorresponding to the target object.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. The determining module43 is configured to, when determining the change of the color parameterof the fluid at each target texture pixel based on the color variationcorresponding to the target object: obtain, for each target texturepixel, position information corresponding to the target texture pixel;and determine, for each target texture pixel, a color of the fluid atthe target texture pixel at a next time point, based on the colorvariation corresponding to the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a color of the fluid at the target texture pixel at a currenttime point.

In a possible implementation, the attribute information includes adisplay position of the target object when the target object isstationary. The parameter of the fluid includes a color parameter. Thedetermining module 43 is configured to: determine, on the user displayinterface based on the display position, a position of each targettexture pixel associated with the target object, and adjust a color ofthe fluid at each target texture pixel to a predetermined color.

In a possible implementation, when at least two target objects areprovided, the attribute information includes respective attributeinformation of each target object of the at least two target objects.The determining module 43 is configured to: determine, on the userdisplay interface based on the respective attribute information of eachtarget object of the at least two target objects, a change of theparameter of the fluid at each target texture pixel associated with eachtarget object, to display on the user display interface a dynamic fluidcorresponding to each target object.

In a possible implementation, the parameter of the fluid includes aspeed parameter. A dynamic fluid display apparatus 50 further includes acolor update module. The color update module is configured to: obtain atime step size for updating the speed parameter; obtain, for each targettexture pixel, the speed parameter of the fluid at the target texturepixel at a current time point; determine, for each target texture pixel,a first texture pixel position at the current time point based on thetime stepsize, the speed parameter of the fluid at the target texturepixel at the current time point, and a position of the target texturepixel at the current time point; and determine a color at the firsttexture pixel position at the current time point as a color of the fluidat the target texture pixel at a next time point.

In a possible implementation, in response to detecting no target objectin the user display interface, the dynamic fluid display apparatus 50further includes a speed update module. The speed update module isconfigured to: determine, for each target texture pixel, a secondtexture pixel position at the current time point based on the timestepsize, the speed parameter of the fluid at the target texture pixelat the current time point, and the position of the target texture pixelat the current time point; and determine, for each target texture pixel,a speed parameter of the fluid at the second texture pixel position atthe current time point as a speed parameter of the fluid at the targettexture pixel at the next time point.

In a possible implementation, the target object includes a target objectin a video or a touch operation object.

In a possible implementation, the target object is the target object inthe video. The attribute information of the target object includes aspeed variation of the target object. The obtaining module 42 isconfigured to: obtain a position of the target object in each frame ofimage of the video; determine a moving distance of the target objectfrom one frame of image to a next frame of image based on the positionof the target object in each frame of image of the video; obtain amoving time of the target object from the one frame of image to the nextframe of image; determine a moving speed of the target object at eachtime point based on the moving distance and the moving time; anddetermine a speed variation of the target object from a current timepoint to a next time point, based on the moving speed of the targetobject at each time point.

In a possible implementation, the target object is the touch operationobject. The attribute information of the target object includes a speedvariation of the target object. The obtaining module 42 is configuredto: detect a swiping operation speed of the touch operation object onthe user display interface at each time point; and determine a speedvariation of the touch operation object from a current time point to anext time point based on the swiping operation speed.

The dynamic fluid display apparatus of the embodiments of the presentdisclosure can perform the dynamic fluid display method provided in theembodiments of the present disclosure, principles of implementation ofwhich are similar to those of the dynamic fluid display method. Actionsperformed by modules in the dynamic fluid display apparatus of theembodiments of the present disclosure correspond to the steps in thedynamic fluid display method of the embodiments of the presentdisclosure. A detailed function description of each module of thedynamic fluid display apparatus can be referred to correspondingdescription of the dynamic fluid display method described above, anddetails thereof will be omitted here.

According to the dynamic fluid display apparatus provided in theembodiments of the present disclosure, the target object on the userdisplay interface is detected. The attribute information of the targetobject is obtained. The change of the parameter of the fluid at eachtarget texture pixel associated with the target object is determined onthe user display interface based on the attribute information of thetarget object. The dynamic fluid on the user display interface isdisplayed based on the change of the parameter of the fluid. With thetechnical solution of the present disclosure, the change of theparameter of the fluid on the user display interface is controlled basedon the attribute information of the target object detected on the userdisplay interface, thereby displaying the dynamic fluid. Such aninteraction method is a novel and interesting.

Based on the same principle as that of the method illustrated in FIG. 3, the embodiments of the present disclosure further provide a dynamicfluid display apparatus 50. As illustrated in FIG. 5 , in addition tothe modules illustrated in FIG. 4 , the dynamic fluid display apparatus50 may further include a second display module 45. The second displaymodule 45 is configured to: display, on the user display interface inresponse to an image input operation of a user, an image correspondingto the image input operation, and display the fluid and the image bysuperimposing the fluid on the image.

Correspondingly, the determining module 43 is configured to: determine,in the image based on the attribute information, the change of theparameter of the fluid at each target texture pixel associated with thetarget object.

The first display module 44 is configured to: display the dynamic fluidin the image based on the change of the parameter of the fluid at eachtarget texture pixel.

The dynamic fluid display apparatus of the embodiments of the presentdisclosure can perform the dynamic fluid display method provided in theembodiments of the present disclosure, principles of implementation ofwhich are similar to those of the dynamic fluid display method. Actionsperformed by modules in the dynamic fluid display apparatus of theembodiments of the present disclosure correspond to the steps in thedynamic fluid display method of the embodiments of the presentdisclosure. A detailed function description of each module of thedynamic fluid display apparatus can be referred to correspondingdescription of the dynamic fluid display method described above, anddetails thereof will be omitted here.

With the dynamic fluid display apparatus provided in the embodiments ofthe present disclosure, the background image inputted by the user may bereceived. The fluid and the background image may be displayed bysuperimposing the fluid on the background image. When the target objectis detected on the user display interface, the change of the parameterof the fluid in the image is controlled based on the attributeinformation of the target object detected on the user display interface,to display the dynamic fluid, thereby realizing that the fluid drivesthe background image to move together with the fluid. Such aninteraction method is novel and interesting.

Reference is now made to FIG. 4 , which is a schematic diagram showing astructure of an electronic device 400 adapted to implement theembodiments of the present disclosure. An executive subject of thetechnical solutions of the embodiments of the present disclosure mayinclude, but are not limited to, mobile terminals such as a mobilephone, a laptop computer, a digital broadcast receiver, a PDA, a tabletcomputer or PAD, a Portable Multimedia Player (PMP), an on-vehicleterminal (e.g., an on-vehicle navigation terminal), a wearable device,etc., and fixed terminals such as a digital TV, a desktop computer, asmart home device, etc. The electronic device illustrated in FIG. 4 isexemplary only, and should not be construed as limiting the function andscope of use of the embodiments of the present disclosure.

The electronic device includes a memory and a processor. Here, theprocessor may be referred to as a processing unit 401 described below,and the memory may include at least one of a Read Only Memory (ROM) 402,a Random Access Memory (RAM) 403, or a storage unit 408 that aredescribed below. Specific details are described below.

As illustrated in FIG. 4 , the electronic device 400 may include aprocessing unit (such as a central processing unit, a graphicsprocessing unit, etc.) 401, which may execute program codes of themethod illustrated in the flowcharts in accordance with programs storedin an ROM 402 or loaded from a storage unit 408 into an RAM 403, toimplement the above functions as defined in the method of theembodiments of the present disclosure. In the RAM 403, various programsand data required for operation of the electronic device 400 may also bestored. The processing unit 401, the ROM 402, and the RAM 403 areconnected to each other through a bus 404. An Input/Output (I/O)interface 405 is also connected to the bus 404.

Generally, the following units may be connected to the I/O interface405: an input unit 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, agyroscope, etc.; an output unit 407 including, for example, a LiquidCrystal Display (LCD), a speaker, an oscillator, etc.; the storage unit408 including, for example, a magnetic tape or a hard disk; and acommunication unit 409. The communication unit 409 may allow theelectronic device 400 to perform wireless or wired communication withother devices for data exchange. Although FIG. 4 illustrates theelectronic device 400 having various units, it can be appreciated thatit is not necessary to implement or provide all the illustrated units.Alternatively, more or fewer units may be implemented or provided.

In particular, according to embodiments of the present disclosure, theprocesses described above with reference to the flowcharts may beimplemented as computer software programs. For example, an embodiment ofthe present disclosure includes a computer program product, whichincludes a computer program carried on a non-transient computer-readablemedium. The computer program includes program codes for implementing themethod illustrated in any of the flowcharts. In these embodiments, thecomputer program may be downloaded and installed from a network throughthe communication unit 409, or installed from the storage unit 408, orinstalled from the ROM 402. When the computer program is executed by theprocessing unit 401, the above-mentioned functions defined in themethods according to the embodiments of the present disclosure areperformed.

It is to be noted that the above computer-readable medium in the presentdisclosure may be a computer-readable signal medium or acomputer-readable storage medium or any combination thereof. Thecomputer-readable storage medium may be, but not limited to, forexample, an electrical, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus, or device, or any combination thereof.More specific examples of the computer-readable storage medium mayinclude, but are not limited to: an electrical connection having one ormore wires, a portable computer disk, a hard disk, an RAM, an ROM, anErasable Programmable Read Only Memory (EPROM) or a flash memory, anoptical fiber, a Compact Disc Read-Only Memory (CD-ROM), an opticalmemory device, a magnetic memory device, or any suitable combinationthereof. In the present disclosure, the computer-readable storage mediummay be any tangible medium including or storing programs, which may beused by or used with an instruction execution system, apparatus, ordevice. However, in the present disclosure, the computer-readable signalmedium may include a data signal propagated in a baseband or as a partof a carrier and carrying computer-readable program codes. Suchpropagated data signal may be in various forms, including but notlimited to an electromagnetic signal, an optical signal, or any suitablecombination thereof. The computer-readable signal medium may be anycomputer-readable medium other than the computer-readable storagemedium, and may transmit, propagate, or transfer programs used by orused with an instruction execution system, apparatus or device. Theprogram codes contained on the computer-readable medium may betransmitted via any appropriate medium, including but not limited toelectric cable, optical cable, Radio Frequency (RF), or any suitablecombination thereof.

In some embodiments, the client and the server can communicate using anycurrently-known or future-developed network protocol, such as HyperTextTransfer Protocol (HTTP), and can be in interconnection communicationwith digital data in any form or medium (e.g., a communication network).Examples of communication networks include a Local Area Network (LAN), aWide Area Network (WAN), the Internet work (e.g., the Internet), and anend-to-end network (e.g., ad hoc end-to-end network), as well as anycurrently-known or future-developed network.

The above computer-readable medium may be included in the aboveelectronic device; or may be present independently without beingassembled into the electronic device.

The above computer-readable medium may carry one or more programs which,when executed by the electronic device, causes the electronic device toimplement the above functions as defined in the method of theembodiments of the present disclosure. For example, the one or moreprograms, when executed by the electronic device, cause the electronicdevice to: detect a target object on a user display interface; obtainattribute information of the target object; determine, on the userdisplay interface based on the attribute information of the targetobject, a change of a parameter of a fluid at each target texture pixelassociated with the target object; and display a dynamic fluid on theuser display interface based on the change of the parameter of thefluid.

The computer program codes for implementing the operations according tothe present disclosure may be written in one or more programminglanguages or any combination thereof. The programming languages mayinclude but are not limited to object-oriented programming languages,such as Java, Smalltalk, or C++, as well as conventionalprocedure-oriented programming languages, such as “C” language orsimilar programming languages. The program codes may be executedcompletely on a user computer, partly on the user computer, as astandalone software package, partly on the user computer and partly on aremote computer, or completely on a remote computer or server. In a casewhere the remote computer is involved, the remote computer may beconnected to the user computer through any types of networks, includinga Local Area Network (LAN) or a Wide Area Network (WAN), or to anexternal computer (e.g., over the Internet by using an Internet serviceprovider).

The flowcharts and block diagrams in the figures illustratearchitectures, functions, and operations of possible implementations ofsystems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowcharts or block diagrams may represent a module, a program segment,or a part of codes. The module, program segment, or part of codes maycontain one or more executable instructions for implementing a specifiedlogical function. It is also to be noted that, in some alternativeimplementations, functions showed in blocks may occur in a differentorder from the order shown in the figures. For example, two blocksillustrated in succession may actually be executed substantially inparallel with each other, or sometimes even in a reverse order,depending on functions involved. It is also to be noted that each blockin the block diagrams and/or flowcharts, or any combination of theblocks in the block diagrams and/or flowcharts, may be implemented usinga dedicated hardware-based system that is configured to performspecified functions or operations or using a combination of dedicatedhardware and computer instructions.

Modules or units involved and described in the embodiments of thepresent disclosure can be implemented in software or hardware. Here, aname of a module or a unit does not constitute a limitation on themodule or the unit itself under certain circumstances.

The functions described above may be performed, at least in part, by oneor more hardware logic components. For example, without limitation,exemplary types of suitable hardware logic components include a FieldProgrammable Gate Array (FPGA), an Application Specific IntegratedCircuit (ASIC), an Application Specific Standard Product (ASSP), aSystem on Chip (SOC), a Complex Programmable Logic Device (CPLD), andthe like.

In the context of this disclosure, a machine-readable medium may be atangible medium, which may contain or store a program for use by or inconnection with an instruction execution system, apparatus, or device.The machine-readable medium may be a machine-readable signal medium or amachine-readable storage medium. The machine-readable medium mayinclude, but is not limited to, an electronic, magnetic, optical,electromagnetic, infrared, or semiconductor system, apparatus, ordevice, or any suitable combination thereof. More specific examples of amachine-readable storage medium include an electrical connection havingone or more wires, a portable computer disk, a hard disk, a RandomAccess Memory (RAM), a Read Only Memory (ROM), an Erasable ProgrammableRead Only Memory (EPROM) or flash memory, an optical fiber, a CompactDisc Read Only Memory (CD-ROM), an optical memory device, a magneticmemory device, or any suitable combination thereof.

According to one or more embodiments of the present disclosure, thepresent disclosure provides a dynamic fluid display method. The methodincludes: detecting a target object on a user display interface;obtaining attribute information of the target object; determining, onthe user display interface based on the attribute information of thetarget object, a change of a parameter of a fluid at each target texturepixel associated with the target object; and displaying a dynamic fluidon the user display interface based on the change of the parameter ofthe fluid.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The attribute information of the target object includesa speed variation of the target object. Determining, on the user displayinterface based on the attribute information of the target object, thechange of the parameter of the fluid at each target texture pixelassociated with the target object includes: determining a change of thespeed parameter of the fluid at each target texture pixel based on thespeed variation of the target object.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. Determining the changeof the speed parameter of the fluid at each target texture pixel basedon the speed variation of the target object includes: obtaining, foreach target texture pixel, position information corresponding to thetarget texture pixel; and determining, for each target texture pixel, aspeed of the fluid at the target texture pixel at a next time point,based on the speed variation of the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a speed of the fluid at the target texture pixel at a currenttime point.

In a possible implementation, the parameter of the fluid includes acolor parameter. The attribute information of the target object includesa color variation corresponding to the target object. Determining, onthe user display interface based on the attribute information of thetarget object, the change of the parameter of the fluid at each targettexture pixel associated with the target object includes: determining achange of the color parameter of the fluid at each target texture pixelbased on the color variation corresponding to the target object.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. Determining the changeof the color parameter of the fluid at each target texture pixel basedon the color variation corresponding to the target object includes:obtaining, for each target texture pixel, position informationcorresponding to the target texture pixel; and determining, for eachtarget texture pixel, a color of the fluid at the target texture pixelat a next time point, based on the color variation corresponding to thetarget object, the initial position information of the target object,the action radius of the target object, the position informationcorresponding to the target texture pixel, and a color of the fluid atthe target texture pixel at a current time point.

In a possible implementation, the attribute information includes adisplay position of the target object when the target object isstationary. The parameter of the fluid includes a color parameter.Determining, on the user display interface based on the attributeinformation of the target object, the change of the parameter of thefluid at each target texture pixel associated with the target objectincludes: determining, on the user display interface based on thedisplay position, a position of each target texture pixel associatedwith the target object, and adjusting a color of the fluid at eachtarget texture pixel to a predetermined color.

In a possible implementation, when at least two target objects areprovided, the attribute information includes respective attributeinformation of each target object of the at least two target objects.Determining, on the user display interface based on the attributeinformation of the target object, the change of the parameter of thefluid at each target texture pixel associated with the target objectincludes: determining, on the user display interface based on therespective attribute information of each target object of the at leasttwo target objects, a change of the parameter of the fluid at eachtarget texture pixel associated with each target object, to display onthe user display interface a dynamic fluid corresponding to each targetobject.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The method further includes, for each target texturepixel: obtaining a time stepsize for updating the speed parameter;obtaining the speed parameter of the fluid at the target texture pixelat a current time point; determining a first texture pixel position atthe current time point based on the time stepsize, the speed parameterof the fluid at the target texture pixel at the current time point, anda position of the target texture pixel at the current time point; anddetermining a color at the first texture pixel position at the currenttime point as a color of the fluid at the target texture pixel at a nexttime point.

In a possible implementation, the method further includes, for eachtarget texture pixel, in response to detecting no target object in theuser display interface: determining a second texture pixel position atthe current time point based on the time stepsize, the speed parameterof the fluid at the target texture pixel at the current time point, andthe position of the target texture pixel at the current time point; anddetermining a speed parameter of the fluid at the second texture pixelposition at the current time point as a speed parameter of the fluid atthe target texture pixel at the next time point.

In a possible implementation, the target object includes a target objectin a video or a touch operation object.

In a possible implementation, the target object is the touch operationobject. The attribute information of the target object includes a speedvariation of the target object. Obtaining the attribute information ofthe target object includes: detecting a swiping operation speed of thetouch operation object on the user display interface at each time point;and determining a speed variation of the touch operation object from acurrent time point to a next time point based on the swiping operationspeed.

In a possible implementation, the target object is the target object inthe video. The attribute information of the target object includes aspeed variation of the target object. Obtaining the attributeinformation of the target object includes: obtaining a position of thetarget object in each frame of image of the video; determining a movingdistance of the target object from one frame of image to a next frame ofimage based on the position of the target object in each frame of imageof the video; obtaining a moving time of the target object from the oneframe of image to the next frame of image; determining a moving speed ofthe target object at each time point based on the moving distance andthe moving time; and determining a speed variation of the target objectfrom a current time point to a next time point, based on the movingspeed of the target object at each time point.

In a possible implementation, the dynamic fluid display method furtherincludes: displaying, on the user display interface in response to animage input operation of a user, an image corresponding to the imageinput operation, and displaying the fluid and the image by superimposingthe fluid on the image. Determining, on the user display interface basedon the attribute information of the target object, the change of theparameter of the fluid at each target texture pixel associated with thetarget object includes: determining, in the image based on the attributeinformation, the change of the parameter of the fluid at each targettexture pixel associated with the target object. Displaying the dynamicfluid on the user display interface based on the change of the parameterof the fluid includes: displaying the dynamic fluid in the image basedon the change of the parameter of the fluid at each target texturepixel.

According to one or more embodiments of the present disclosure, thepresent disclosure provides a dynamic fluid display apparatus. Theapparatus includes: a detection module configured to detect a targetobject on a user display interface; an obtaining module configured toobtain attribute information of the target object; a determining moduleconfigured to determine, on the user display interface based on theattribute information of the target object, a change of a parameter of afluid at each target texture pixel associated with the target object;and a first display module configured to display a dynamic fluid on theuser display interface based on the change of the parameter of thefluid.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The attribute information of the target object includesa speed variation of the target object. The determining module isconfigured to: determine a change of the speed parameter of the fluid ateach target texture pixel based on the speed variation of the targetobject.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. Determining the changeof the speed parameter of the fluid at each target texture pixel basedon the speed variation of the target object includes: obtaining, foreach target texture pixel, position information corresponding to thetarget texture pixel; and determining, for each target texture pixel, aspeed of the fluid at the target texture pixel at a next time point,based on the speed variation of the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a speed of the fluid at the target texture pixel at a currenttime point.

In a possible implementation, the parameter of the fluid includes acolor parameter. The attribute information of the target object includesa color variation corresponding to the target object. The determiningmodule is configured to: determine a change of the color parameter ofthe fluid at each target texture pixel based on the color variationcorresponding to the target object.

In a possible implementation, the attribute information of the targetobject further includes initial position information of the targetobject and an action radius of the target object. The determining moduleis configured to, when determining the change of the color parameter ofthe fluid at each target texture pixel based on the color variationcorresponding to the target object: obtain, for each target texturepixel, position information corresponding to the target texture pixel;and determine, for each target texture pixel, a color of the fluid atthe target texture pixel at a next time point, based on the colorvariation corresponding to the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a color of the fluid at the target texture pixel at a currenttime point.

In a possible implementation, the attribute information includes adisplay position of the target object when the target object isstationary. The parameter of the fluid includes a color parameter. Thedetermining module is configured to: determine, on the user displayinterface based on the display position, a position of each targettexture pixel associated with the target object, and adjust a color ofthe fluid at each target texture pixel to a predetermined color.

In a possible implementation, when at least two target objects areprovided, the attribute information includes respective attributeinformation of each target object of the at least two target objects.The determining module is configured to: determine, on the user displayinterface based on the respective attribute information of each targetobject of the at least two target objects, a change of the parameter ofthe fluid at each target texture pixel associated with each targetobject, to display on the user display interface a dynamic fluidcorresponding to each target object.

In a possible implementation, the parameter of the fluid includes aspeed parameter. The dynamic fluid display apparatus further includes acolor update module. The color update module is configured to: obtain atime stepsize for updating the speed parameter; obtain, for each targettexture pixel, the speed parameter of the fluid at the target texturepixel at a current time point; determine, for each target texture pixel,a first texture pixel position at the current time point based on thetime stepsize, the speed parameter of the fluid at the target texturepixel at the current time point, and a position of the target texturepixel at the current time point; and determine a color at the firsttexture pixel position at the current time point as a color of the fluidat the target texture pixel at a next time point.

In a possible implementation, in response to detecting no target objectin the user display interface, the dynamic fluid display apparatusfurther includes a speed update module. The speed update module isconfigured to: determine, for each target texture pixel, a secondtexture pixel position at the current time point based on the timestepsize, the speed parameter of the fluid at the target texture pixelat the current time point, and the position of the target texture pixelat the current time point; and determine, for each target texture pixel,a speed parameter of the fluid at the second texture pixel position atthe current time point as a speed parameter of the fluid at the targettexture pixel at the next time point.

In a possible implementation, the target object includes a target objectin a video or a touch operation object.

In a possible implementation, the target object is the target object inthe video. The attribute information of the target object includes aspeed variation of the target object. The obtaining module is configuredto: obtain a position of the target object in each frame of image of thevideo; determine a moving distance of the target object from one frameof image to a next frame of image based on the position of the targetobject in each frame of image of the video; obtain a moving time of thetarget object from the one frame of image to the next frame of image;determine a moving speed of the target object at each time point basedon the moving distance and the moving time; and determine a speedvariation of the target object from a current time point to a next timepoint, based on the moving speed of the target object at each timepoint.

In a possible implementation, the target object is the touch operationobject. The attribute information of the target object includes a speedvariation of the target object. The obtaining module is configured to:detect a swiping operation speed of the touch operation object on theuser display interface at each time point; and determine a speedvariation of the touch operation object from a current time point to anext time point based on the swiping operation speed.

In a possible implementation, the dynamic fluid display apparatusfurther includes a second display module. The second display module isconfigured to: display, on the user display interface in response to animage input operation of a user, an image corresponding to the imageinput operation, and display the fluid and the image by superimposingthe fluid on the image.

Correspondingly, the determining module is configured to: determine, inthe image based on the attribute information, the change of theparameter of the fluid at each target texture pixel associated with thetarget object.

The first display module is configured to: display the dynamic fluid inthe image based on the change of the parameter of the fluid at eachtarget texture pixel.

According to one or more embodiments of the present disclosure, thepresent disclosure provides an electronic device. The electronic deviceincludes: one or more processors; and a memory having one or moreapplications stored thereon. The one or more applications, when executedby the one or more processors, cause the electronic device to performthe dynamic fluid display method.

According to one or more embodiments of the present disclosure, thepresent disclosure provides a computer-readable medium. Thecomputer-readable medium is configured to store computer instructions.The computer instructions, when executed by a computer, cause thecomputer to perform the above-mentioned dynamic fluid display method.

According to one or more embodiments of the present disclosure, thepresent disclosure provides a computer program product. The computerprogram product includes computer instructions. The computerinstructions, when executed by a computer, implement the above-mentioneddynamic fluid display method.

The above description is only intended to explain the preferredembodiments of the present disclosure and the employed principles oftechnology. It will be appreciated by those skilled in the art that thescope of the present disclosure herein is not limited to the technicalsolutions formed by the specific combinations of the above technicalfeatures, but should also encompass other technical solutions formed byany other combinations of features described above or equivalentsthereof without departing from the above ideas of the presentdisclosure. For example, the above features and the technical featuresdisclosed in the present disclosure having similar functions (but notlimited to them) are replaced with each other to form the technicalsolution.

Further, although the operations are depicted in a specific order, thisshould not be understood as requiring these operations to be performedin the specific order illustrated or in a sequential order. Undercertain circumstances, multitasking and parallel processing may beadvantageous. Likewise, although several specific implementation detailsare included in the above discussion, these should not be construed aslimitations on the scope of the present disclosure. Certain featuresthat are described in the context of separate embodiments can also beimplemented in combination in a single embodiment. Conversely, variousfeatures described in the context of a single embodiment can also beimplemented in multiple embodiments separately or in any suitablecombination.

Although the subject matter has been described in language specific tostructural features and/or logical actions of method, it should beunderstood that the subject matter defined in the appended claims is notnecessarily limited to the specific features or actions described above.On the contrary, the specific features and actions described above aremerely exemplary forms of implementing the claims.

What is claimed is:
 1. A dynamic fluid display method, comprising:detecting a target object on a user display interface; obtainingattribute information of the target object; determining, on the userdisplay interface based on the attribute information of the targetobject, a change of a parameter of a fluid at each target texture pixelassociated with the target object; and displaying a dynamic fluid on theuser display interface based on the change of the parameter of thefluid.
 2. The dynamic fluid display method according to claim 1, whereinthe parameter of the fluid comprises a speed parameter, the attributeinformation of the target object comprises a speed variation of thetarget object, and said determining, on the user display interface basedon the attribute information of the target object, the change of theparameter of the fluid at each target texture pixel associated with thetarget object comprises: determining a change of the speed parameter ofthe fluid at each target texture pixel based on the speed variation ofthe target object.
 3. The dynamic fluid display method according toclaim 2, wherein the attribute information of the target object furthercomprises initial position information of the target object and anaction radius of the target object, and said determining the change ofthe speed parameter of the fluid at each target texture pixel based onthe speed variation of the target object comprises: obtaining, for eachtarget texture pixel, position information corresponding to the targettexture pixel; and determining, for each target texture pixel, a speedof the fluid at the target texture pixel at a next time point, based onthe speed variation of the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a speed of the fluid at the target texture pixel at a currenttime point.
 4. The dynamic fluid display method according to claim 1,wherein the parameter of the fluid comprises a color parameter, theattribute information of the target object comprises a color variationcorresponding to the target object, and said determining, on the userdisplay interface based on the attribute information of the targetobject, the change of the parameter of the fluid at each target texturepixel associated with the target object comprises: determining a changeof the color parameter of the fluid at each target texture pixel basedon the color variation corresponding to the target object.
 5. Thedynamic fluid display method according to claim 4, wherein the attributeinformation of the target object further comprises initial positioninformation of the target object and an action radius of the targetobject, and said determining the change of the color parameter of thefluid at each target texture pixel based on the color variationcorresponding to the target object comprises: obtaining, for each targettexture pixel, position information corresponding to the target texturepixel; and determining, for each target texture pixel, a color of thefluid at the target texture pixel at a next time point, based on thecolor variation corresponding to the target object, the initial positioninformation of the target object, the action radius of the targetobject, the position information corresponding to the target texturepixel, and a color of the fluid at the target texture pixel at a currenttime point.
 6. The dynamic fluid display method according to claim 1,wherein the attribute information comprises a display position of thetarget object when the target object is stationary, the parameter of thefluid comprises a color parameter, and said determining, on the userdisplay interface based on the attribute information of the targetobject, the change of the parameter of the fluid at each target texturepixel associated with the target object comprises: determining, on theuser display interface based on the display position, a position of eachtarget texture pixel associated with the target object, and adjusting acolor of the fluid at each target texture pixel to a predeterminedcolor.
 7. The dynamic fluid display method according to claim 1, whereinwhen at least two target objects are provided, the attribute informationcomprises respective attribute information of each target object of theat least two target objects, and said determining, on the user displayinterface based on the attribute information of the target object, thechange of the parameter of the fluid at each target texture pixelassociated with the target object comprises: determining, on the userdisplay interface based on the respective attribute information of eachtarget object of the at least two target objects, a change of theparameter of the fluid at each target texture pixel associated with eachtarget object, to display on the user display interface a dynamic fluidcorresponding to each target object.
 8. The dynamic fluid display methodaccording to claim 1, wherein the parameter of the fluid comprises aspeed parameter, and the method further comprises, for each targettexture pixel: obtaining a time stepsize for updating the speedparameter; obtaining the speed parameter of the fluid at the targettexture pixel at a current time point; determining a first texture pixelposition at the current time point based on the time stepsize, the speedparameter of the fluid at the target texture pixel at the current timepoint, and a position of the target texture pixel at the current timepoint; and determining a color at the first texture pixel position atthe current time point as a color of the fluid at the target texturepixel at a next time point.
 9. The dynamic fluid display methodaccording to claim 8, further comprising, for each target texture pixel,in response to detecting no target object in the user display interface:determining a second texture pixel position at the current time pointbased on the time stepsize, the speed parameter of the fluid at thetarget texture pixel at the current time point, and the position of thetarget texture pixel at the current time point; and determining a speedparameter of the fluid at the second texture pixel position at thecurrent time point as a speed parameter of the fluid at the targettexture pixel at the next time point.
 10. The dynamic fluid displaymethod according to claim 1, wherein the target object comprises atarget object in a video or a touch operation object.
 11. The dynamicfluid display method according to claim 10, wherein the target object isthe touch operation object, the attribute information of the targetobject comprises a speed variation of the target object, and saidobtaining the attribute information of the target object comprises:detecting a swiping operation speed of the touch operation object on theuser display interface at each time point; and determining a speedvariation of the touch operation object from a current time point to anext time point based on the swiping operation speed.
 12. The dynamicfluid display method according to claim 10, wherein the target object isthe target object in the video, the attribute information of the targetobject comprises a speed variation of the target object, and saidobtaining the attribute information of the target object comprises:obtaining a position of the target object in each frame of image of thevideo; determining a moving distance of the target object from one frameof image to a next frame of image based on the position of the targetobject in each frame of image of the video; obtaining a moving time ofthe target object from the one frame of image to the next frame ofimage; determining a moving speed of the target object at each timepoint based on the moving distance and the moving time; and determininga speed variation of the target object from a current time point to anext time point, based on the moving speed of the target object at eachtime point.
 13. The dynamic fluid display method according to claim 1,further comprising: displaying, on the user display interface inresponse to an image input operation of a user, an image correspondingto the image input operation, and displaying the fluid and the image bysuperimposing the fluid on the image, wherein said determining, on theuser display interface based on the attribute information of the targetobject, the change of the parameter of the fluid at each target texturepixel associated with the target object comprises: determining, in theimage based on the attribute information, the change of the parameter ofthe fluid at each target texture pixel associated with the targetobject; and said displaying the dynamic fluid on the user displayinterface based on the change of the parameter of the fluid comprises:displaying the dynamic fluid in the image based on the change of theparameter of the fluid at each target texture pixel.
 14. An electronicdevice, comprising: one or more processors; and a memory having one ormore applications stored thereon, wherein the one or more applications,when executed by the one or more processors, cause the electronic deviceto perform a dynamic fluid display method, the dynamic fluid displaymethod comprising: detecting a target object on a user displayinterface; obtaining attribute information of the target object;determining, on the user display interface based on the attributeinformation of the target object, a change of a parameter of a fluid ateach target texture pixel associated with the target object; anddisplaying a dynamic fluid on the user display interface based on thechange of the parameter of the fluid.
 15. The electronic deviceaccording to claim 14, wherein the parameter of the fluid comprises aspeed parameter, the attribute information of the target objectcomprises a speed variation of the target object, and said determining,on the user display interface based on the attribute information of thetarget object, the change of the parameter of the fluid at each targettexture pixel associated with the target object comprises: determining achange of the speed parameter of the fluid at each target texture pixelbased on the speed variation of the target object.
 16. The electronicdevice according to claim 14, wherein the parameter of the fluidcomprises a color parameter, the attribute information of the targetobject comprises a color variation corresponding to the target object,and said determining, on the user display interface based on theattribute information of the target object, the change of the parameterof the fluid at each target texture pixel associated with the targetobject comprises: determining a change of the color parameter of thefluid at each target texture pixel based on the color variationcorresponding to the target object.
 17. The electronic device accordingto claim 14, further comprising, for each target texture pixel, inresponse to detecting no target object in the user display interface:determining a second texture pixel position at the current time pointbased on the time stepsize, the speed parameter of the fluid at thetarget texture pixel at the current time point, and the position of thetarget texture pixel at the current time point; and determining a speedparameter of the fluid at the second texture pixel position at thecurrent time point as a speed parameter of the fluid at the targettexture pixel at the next time point.
 18. The electronic deviceaccording to claim 14, wherein the target object is the touch operationobject, the attribute information of the target object comprises a speedvariation of the target object, and said obtaining the attributeinformation of the target object comprises: detecting a swipingoperation speed of the touch operation object on the user displayinterface at each time point; and determining a speed variation of thetouch operation object from a current time point to a next time pointbased on the swiping operation speed.
 19. The electronic deviceaccording to claim 14, wherein the target object is the target object inthe video, the attribute information of the target object comprises aspeed variation of the target object, and said obtaining the attributeinformation of the target object comprises: obtaining a position of thetarget object in each frame of image of the video; determining a movingdistance of the target object from one frame of image to a next frame ofimage based on the position of the target object in each frame of imageof the video; obtaining a moving time of the target object from the oneframe of image to the next frame of image; determining a moving speed ofthe target object at each time point based on the moving distance andthe moving time; and determining a speed variation of the target objectfrom a current time point to a next time point, based on the movingspeed of the target object at each time point.
 20. A non-volatilecomputer-readable medium, having computer instructions stored thereon,wherein the computer instructions, when executed by a computer, causethe computer to perform the dynamic fluid display method according toclaim 1.